package com.bmps.springcloud.insuredmicroservice.model.cancel.coresystem;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * description:
 * 投保单号
 *
 * @author jackdaw
 * @date 2019-11-29 10:26
 */
public class PrtNoModel implements Serializable {
    private static final long serialVersionUID = -3466813647540035781L;
    @XStreamAlias("PrtNo")
    @NotNull(message = "prtNo节点不能为空！")
    private String prtNo;

    public String getPrtNo() {
        return prtNo;
    }

    public void setPrtNo(String prtNo) {
        this.prtNo = prtNo;
    }

    @Override
    public String toString() {
        return "PrtNoModel{" +
                "prtNo='" + prtNo + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }

        if (!(o instanceof PrtNoModel)) {
            return false;
        }

        PrtNoModel that = (PrtNoModel) o;

        return new EqualsBuilder()
                .append(prtNo, that.prtNo)
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37)
                .append(prtNo)
                .toHashCode();
    }
}
